package com.example.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * fileName:TestController
 * description:
 * author: LJV
 * createTime:2022/3/15 15:05
 * version:1.0.0
 */
@RestController
public class TestController {

    @GetMapping("test")
    public String test(@RequestParam("str") String string){
        StringBuffer stringBuffer = new StringBuffer(string);
        return stringBuffer.reverse().toString();
    }

    @GetMapping("demo")
    public String demo(@RequestParam("str") String string){
        StringBuffer stringBuffer = new StringBuffer(string);
        return stringBuffer.reverse().append("葛培淼").toString();
    }

}
